<?php
class YouNet_Form_Element_Css extends YouNet_Form_Element_File
{
	private $_specs = 'skin';
	private $_options = array(
		'decorators' => array(
			'File',
			'Description',
			'Errors',
			array(
				array(
					'data'	=> 'HtmlTag'
				),
				array(
					'tag' 	=> 'dd'
				)
			),
			array(
				array(
					'label' => 'Label'
				),
				array(
					'tag' 	=> 'dt'
				)
			)
		),
		'label'	=> 'Customize CSS <span class="tooltip_label" title="Customize your Fan Page theme by upload another css file.">[?]</span>'
	);
	
	public function __construct($specs = NULL, $options = NULL)
	{
		if (isset($specs))
			$this->_specs 	= $specs;
		if (isset($options))
			$this->_options = array_merge($this->_options, $options);
			
		parent::__construct($this->_specs, $this->_options);
		$this->getDecorator('Label')->setOption('escape', false);
		$this->setDestination(SKIN_PATH);
		$this->addValidator('Count', false, 1);
		$this->addValidator('Size', false, '200KB');
		$this->addValidator('Extension', false, 'css');
		$this->setDescription(
            sprintf('Css max size %s', '200KB')
		);
	}
}